/* 添加收货地址页面样式 */
.add-address-page {
  min-height: 100vh;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
}

/* 顶部导航栏 */
.add-address-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: #fff;
  border-bottom: 1px solid #e8e8e8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #333;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.back-btn:hover {
  background-color: #f0f0f0;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
  flex: 1;
  text-align: center;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: #666;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.action-btn:hover {
  background-color: #f0f0f0;
}

/* 表单区域 */
.form-section {
  background-color: #fff;
  margin-bottom: 12px;
}

.form-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.form-item:last-child {
  border-bottom: none;
}

.form-label {
  width: 80px;
  font-size: 14px;
  color: #333;
  font-weight: 500;
  flex-shrink: 0;
}

.form-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #333;
  background: transparent;
}

.form-input::placeholder {
  color: #999;
}

/* 地区选择器 */
.region-selector {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 8px 0;
}

.region-placeholder {
  color: #999;
  font-size: 14px;
}

.region-text {
  color: #333;
  font-size: 14px;
}

.arrow-icon {
  color: #999;
  font-size: 14px;
}



/* 默认地址设置 */
.default-section {
  background-color: #fff;
  margin-bottom: 12px;
}

.default-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}

.default-info {
  flex: 1;
}

.default-title {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  margin-bottom: 4px;
}

.default-desc {
  font-size: 12px;
  color: #999;
  line-height: 1.4;
}

/* 开关样式 */
.toggle-switch {
  width: 44px;
  height: 24px;
  background-color: #ddd;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.3s;
}

.toggle-switch.active {
  background-color: #1890ff;
}

.toggle-slider {
  width: 20px;
  height: 20px;
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-slider.active {
  transform: translateX(20px);
}

/* 底部保存按钮 */
.bottom-action {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  padding: 16px;
  border-top: 1px solid #e8e8e8;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.save-btn {
  width: 100%;
  background: #1890ff;
  color: white;
  border: none;
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.save-btn:hover {
  background: #096dd9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}

.save-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.save-btn:disabled:hover {
  background: #ccc;
  transform: none;
  box-shadow: none;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .add-address-header {
    padding: 12px;
  }
  
  .header-title {
    font-size: 16px;
  }
  
  .action-btn {
    font-size: 14px;
    padding: 6px;
  }
  
  .form-item {
    padding: 14px 16px;
  }
  
  .form-label {
    width: 70px;
    font-size: 13px;
  }
  
  .form-input {
    font-size: 13px;
  }
  
     .save-btn {
     padding: 14px;
     font-size: 15px;
   }
 }

/* 地区选择弹窗样式 */
.region-picker-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
}

.region-picker-modal {
  width: 100%;
  background-color: #fff;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background-color: #f5f5f5;
  border-bottom: 1px solid #e8e8e8;
}

.picker-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.cancel-btn {
  color: #333;
}

.confirm-btn {
  color: #1890ff;
  font-weight: 600;
}

.picker-btn:hover {
  background-color: #e8e8e8;
}

.picker-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.region-picker-content {
  display: flex;
  height: 300px;
  background-color: #fff;
  position: relative;
}

.picker-column {
  flex: 1;
  overflow-y: auto;
  position: relative;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.picker-column::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

.picker-item {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #999;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0 16px;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  overflow: hidden;
}

.picker-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(24, 144, 255, 0.1), transparent);
  transition: left 0.3s ease;
}

.picker-item:hover::before {
  left: 100%;
}

.picker-item.active {
  color: #1890ff;
  font-weight: 600;
  background-color: rgba(24, 144, 255, 0.1);
  border-radius: 4px;
  margin: 0 4px;
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.picker-item:hover {
  background-color: #f5f5f5;
  transform: translateY(-1px);
}

.picker-item:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}